/*
 * Copyright (c) 2025 HiSilicon (Shanghai) Technologies Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef DISPLYA_ADAPT_VIDEO_H
#define DISPLYA_ADAPT_VIDEO_H

#if defined(ENABLE_H8) || defined(ENABLE_H9)
#include "ot_common_video.h"
#else
#include "hi_comm_video.h"
#endif

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif /* __cplusplus */

#if defined(ENABLE_H8) || defined(ENABLE_H9)
#define COMPRESS_MODE_NONE          OT_COMPRESS_MODE_NONE
#define COMPRESS_MODE_SEG           OT_COMPRESS_MODE_SEG
#define COMPRESS_MODE_TILE          OT_COMPRESS_MODE_TILE
#define COMPRESS_MODE_LINE          OT_COMPRESS_MODE_LINE
#define COMPRESS_MODE_FRAME         OT_COMPRESS_MODE_FRAME
#define COMPRESS_MODE_BUTT          OT_COMPRESS_MODE_BUTT
typedef ot_compress_mode COMPRESS_MODE_E;

#define DYNAMIC_RANGE_SDR8          OT_DYNAMIC_RANGE_SDR8
#define DYNAMIC_RANGE_SDR10         OT_DYNAMIC_RANGE_SDR10
#define DYNAMIC_RANGE_HDR10         OT_DYNAMIC_RANGE_HDR10
#define DYNAMIC_RANGE_HLG           OT_DYNAMIC_RANGE_HLG
#define DYNAMIC_RANGE_SLF           OT_DYNAMIC_RANGE_SLF
#define DYNAMIC_RANGE_XDR           OT_DYNAMIC_RANGE_XDR
#define DYNAMIC_RANGE_BUTT          OT_DYNAMIC_RANGE_BUTT
typedef ot_dynamic_range DYNAMIC_RANGE_E;

#define VIDEO_FORMAT_LINEAR          OT_VIDEO_FORMAT_LINEAR
#define VIDEO_FORMAT_TILE_64X16      OT_VIDEO_FORMAT_TILE_64x16
#define VIDEO_FORMAT_TILE_16X8       OT_VIDEO_FORMAT_TILE_16x8
#define VIDEO_FORMAT_BUTT            OT_VIDEO_FORMAT_BUTT
typedef ot_dynamic_range VIDEO_FORMAT_E;

#define PIXEL_FORMAT_RGB_444            OT_PIXEL_FORMAT_RGB_444
#define PIXEL_FORMAT_RGB_555            OT_PIXEL_FORMAT_RGB_555
#define PIXEL_FORMAT_RGB_565            OT_PIXEL_FORMAT_RGB_565
#define PIXEL_FORMAT_RGB_888            OT_PIXEL_FORMAT_RGB_888
#define PIXEL_FORMAT_BGR_444            OT_PIXEL_FORMAT_BGR_444
#define PIXEL_FORMAT_BGR_555            OT_PIXEL_FORMAT_BGR_555
#define PIXEL_FORMAT_BGR_565            OT_PIXEL_FORMAT_BGR_565
#define PIXEL_FORMAT_BGR_888            OT_PIXEL_FORMAT_BGR_888
#define PIXEL_FORMAT_ARGB_1555          OT_PIXEL_FORMAT_ARGB_1555
#define PIXEL_FORMAT_ARGB_4444          OT_PIXEL_FORMAT_ARGB_4444
#define PIXEL_FORMAT_ARGB_8565          OT_PIXEL_FORMAT_ARGB_8565
#define PIXEL_FORMAT_ARGB_8888          OT_PIXEL_FORMAT_ARGB_8888
#define PIXEL_FORMAT_ARGB_2BPP          OT_PIXEL_FORMAT_ARGB_2BPP
#define PIXEL_FORMAT_ABGR_1555          OT_PIXEL_FORMAT_ABGR_1555
#define PIXEL_FORMAT_ABGR_4444          OT_PIXEL_FORMAT_ABGR_4444
#define PIXEL_FORMAT_ABGR_8565          OT_PIXEL_FORMAT_ABGR_8565
#define PIXEL_FORMAT_ABGR_8888          OT_PIXEL_FORMAT_ABGR_8888
#define PIXEL_FORMAT_RGB_BAYER_8BPP     OT_PIXEL_FORMAT_RGB_BAYER_8BPP
#define PIXEL_FORMAT_RGB_BAYER_10BPP    OT_PIXEL_FORMAT_RGB_BAYER_10BPP
#define PIXEL_FORMAT_RGB_BAYER_12BPP    OT_PIXEL_FORMAT_RGB_BAYER_12BPP
#define PIXEL_FORMAT_RGB_BAYER_14BPP    OT_PIXEL_FORMAT_RGB_BAYER_14BPP
#define PIXEL_FORMAT_RGB_BAYER_16BPP    OT_PIXEL_FORMAT_RGB_BAYER_16BPP
#define PIXEL_FORMAT_YVU_PLANAR_422     OT_PIXEL_FORMAT_YVU_PLANAR_422
#define PIXEL_FORMAT_YVU_PLANAR_420     OT_PIXEL_FORMAT_YVU_PLANAR_420
#define PIXEL_FORMAT_YVU_PLANAR_444     OT_PIXEL_FORMAT_YVU_PLANAR_444
#define PIXEL_FORMAT_YVU_SEMIPLANAR_422 OT_PIXEL_FORMAT_YVU_SEMIPLANAR_422
#define PIXEL_FORMAT_YVU_SEMIPLANAR_420 OT_PIXEL_FORMAT_YVU_SEMIPLANAR_420
#define PIXEL_FORMAT_YVU_SEMIPLANAR_444 OT_PIXEL_FORMAT_YVU_SEMIPLANAR_444
#define PIXEL_FORMAT_YUV_SEMIPLANAR_422 OT_PIXEL_FORMAT_YUV_SEMIPLANAR_422
#define PIXEL_FORMAT_YUV_SEMIPLANAR_420 OT_PIXEL_FORMAT_YUV_SEMIPLANAR_420
#define PIXEL_FORMAT_YUV_SEMIPLANAR_444 OT_PIXEL_FORMAT_YUV_SEMIPLANAR_444
#define PIXEL_FORMAT_YUYV_PACKAGE_422   OT_PIXEL_FORMAT_YUYV_PACKAGE_422
#define PIXEL_FORMAT_YVYU_PACKAGE_422   OT_PIXEL_FORMAT_YVYU_PACKAGE_422
#define PIXEL_FORMAT_UYVY_PACKAGE_422   OT_PIXEL_FORMAT_UYVY_PACKAGE_422
#define PIXEL_FORMAT_VYUY_PACKAGE_422   OT_PIXEL_FORMAT_VYUY_PACKAGE_422
#define PIXEL_FORMAT_YYUV_PACKAGE_422   OT_PIXEL_FORMAT_YYUV_PACKAGE_422
#define PIXEL_FORMAT_YYVU_PACKAGE_422   OT_PIXEL_FORMAT_YYVU_PACKAGE_422
#define PIXEL_FORMAT_UVYY_PACKAGE_422   OT_PIXEL_FORMAT_UVYY_PACKAGE_422
#define PIXEL_FORMAT_VUYY_PACKAGE_422   OT_PIXEL_FORMAT_VUYY_PACKAGE_422
#define PIXEL_FORMAT_VY1UY0_PACKAGE_422 OT_PIXEL_FORMAT_VY1UY0_PACKAGE_422
#define PIXEL_FORMAT_YUV_400            OT_PIXEL_FORMAT_YUV_400
#define PIXEL_FORMAT_UV_420             OT_PIXEL_FORMAT_UV_420
#define PIXEL_FORMAT_BGR_888_PLANAR     OT_PIXEL_FORMAT_BGR_888_PLANAR
#define PIXEL_FORMAT_HSV_888_PACKAGE    OT_PIXEL_FORMAT_HSV_888_PACKAGE
#define PIXEL_FORMAT_HSV_888_PLANAR     OT_PIXEL_FORMAT_HSV_888_PLANAR
#define PIXEL_FORMAT_LAB_888_PACKAGE    OT_PIXEL_FORMAT_LAB_888_PACKAGE
#define PIXEL_FORMAT_LAB_888_PLANAR     OT_PIXEL_FORMAT_LAB_888_PLANAR
#define PIXEL_FORMAT_S8C1               OT_PIXEL_FORMAT_S8C1
#define PIXEL_FORMAT_S8C2_PACKAGE       OT_PIXEL_FORMAT_S8C2_PACKAGE
#define PIXEL_FORMAT_S8C2_PLANAR        OT_PIXEL_FORMAT_S8C2_PLANAR
#define PIXEL_FORMAT_S8C3_PLANAR        OT_PIXEL_FORMAT_S8C3_PLANAR
#define PIXEL_FORMAT_S16C1              OT_PIXEL_FORMAT_S16C1
#define PIXEL_FORMAT_U8C1               OT_PIXEL_FORMAT_U8C1
#define PIXEL_FORMAT_U16C1              OT_PIXEL_FORMAT_U16C1
#define PIXEL_FORMAT_S32C1              OT_PIXEL_FORMAT_S32C1
#define PIXEL_FORMAT_U32C1              OT_PIXEL_FORMAT_U32C1
#define PIXEL_FORMAT_U64C1              OT_PIXEL_FORMAT_U64C1
#define PIXEL_FORMAT_S64C1              OT_PIXEL_FORMAT_S64C1
#define PIXEL_FORMAT_BUTT               OT_PIXEL_FORMAT_BUTT
typedef ot_pixel_format PIXEL_FORMAT_E;

typedef ot_frame_rate_ctrl FRAME_RATE_CTRL_S;

#define ASPECT_RATIO_NONE               OT_ASPECT_RATIO_NONE
#define ASPECT_RATIO_AUTO               OT_ASPECT_RATIO_AUTO
#define ASPECT_RATIO_MANUAL             OT_ASPECT_RATIO_MANUAL
#define ASPECT_RATIO_BUTT               OT_ASPECT_RATIO_BUTT
typedef ot_aspect_ratio_type ASPECT_RATIO_E;

typedef ot_aspect_ratio ASPECT_RATIO_S;

typedef ot_video_frame  VIDEO_FRAME_S;

typedef ot_video_frame_info VIDEO_FRAME_INFO_S;

#define ROTATION_0                      OT_ROTATION_0
#define ROTATION_90                     OT_ROTATION_90
#define ROTATION_180                    OT_ROTATION_180
#define ROTATION_270                    OT_ROTATION_270
#define ROTATION_BUTT                   OT_ROTATION_BUTT
typedef ot_rotation ROTATION_E;
#endif

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */

#endif // DISPLYA_ADAPT_VIDEO_H
